package per.sunmes.lesrb.data;

import per.sunmes.lesrb.util.RandomUtil;

public class MaskInt {

	double up, down;

	public MaskInt() {
	}

	public MaskInt(int value) {
		set(value);
	}

	public int value() {
		return (int) (up + down);
	}

	public void set(int value) {
		up = RandomUtil.rand(value, value / 2);
		down = value - up;
	}

	public void add(int value) {
		set(value() + value);
	}

	public void sub(int value) {
		set(value() - value);
	}

}
